﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BugTacker.Common;

namespace BugTracker.WebUX.WebCode
{
    public class BTHttpApplication
    {
        public static class Constants
        {
            public const string PREVIEW_IMG_KEY = "PREVIEW_IMG_KEY";
            public const string GRIDVIEW_IMG_KEY = "GRIDVIEW_IMG_KEY";
            public const string ENTITY_KEY = "ENTITY_KEY";
            public const string PRIMARY_KEY = "PRIMARY_KEY";
            public const string ACTION_MODE_KEY = "ACTION_MODE_KEY";
            public const string POSTED_FILE_KEY = "POSTED_FILE_KEY";
            public const string PROJECT_KEY = "PROJECT_KEY";
            public const string DATETIME_FORMAT = "dd-MMM-yyyy";
        }

        public static class UrlParam
        {
            public const string IMAGE_ID = "imageid";
            public const string FETCH_FORMAT = "?p1={0}&p2={1}";
            public const string BTUSER_ID = "btuserid";
            public const string PROJECT_ID = "projectid";
            public const string ISSUE_ID = "issueid";
            public const string GENERIC_ID = "id";
        }

        public static class AppPaths
        {
            public static string Root
            {
                get
                {
                    return CommonRoutines.GetHost();
                }
            }

            public static string Login
            {
                get
                {
                    return ("~/Login.aspx");
                }
            }

            public static string FetchImageHandler
            {
                get
                {
                    return ("~/Shared/FetchImage.ashx");
                }
            }

            public static string FetchSessionImageHandler
            {
                get
                {
                    return ("~/Shared/FetchSessionImage.ashx");
                }
            }

            public static string FetchGridViewSessionImageHandler
            {
                get
                {
                    return ("~/Shared/FetchGridViewSessionImage.ashx");
                }
            }

            public static string CompanyTypeList
            {
                get
                {
                    return ("~/Admin/Pages/Company/CompanyTypeList.aspx");
                }
            }

            public static string CompanyTypeDetail
            {
                get
                {
                    return ("~/Admin/Pages/Company/CompanyTypeDetail.aspx");
                }
            }

            public static string UserTypeList
            {
                get
                {
                    return ("~/Admin/Pages/User/UserTypeList.aspx");
                }
            }

            public static string UserTypeDetail
            {
                get
                {
                    return ("~/Admin/Pages/User/UserTypeDetail.aspx");
                }
            }

            public static string GetActiveImage(bool isActive = false)
            {
                string link = "~/Styles/Blue/Images/ico_gv_{0}active_bullet.png";
                string active = (isActive) ? "" : "in";
                return string.Format(link, active);
            }

            public static string IssueTypeList
            {
                get
                {
                    return ("~/Admin/Pages/Issue/IssueTypeList.aspx");
                }
            }

            public static string IssueTypeDetail
            {
                get
                {
                    return ("~/Admin/Pages/Issue/IssueTypeDetail.aspx");
                }
            }

            public static string IssueStatusTypeList
            {
                get
                {
                    return ("~/Admin/Pages/Issue/IssueStatusTypeList.aspx");
                }
            }

            public static string IssueStatusTypeDetail
            {
                get
                {
                    return ("~/Admin/Pages/Issue/IssueStatusTypeDetail.aspx");
                }
            }

            public static string IssueResolutionTypeList
            {
                get
                {
                    return ("~/Admin/Pages/Issue/IssueResolutionTypeList.aspx");
                }
            }

            public static string IssueResolutionTypeDetail
            {
                get
                {
                    return ("~/Admin/Pages/Issue/IssueResolutionTypeDetail.aspx");
                }
            }

            public static string IssuePriorityTypeList
            {
                get
                {
                    return ("~/Admin/Pages/Issue/IssuePriorityTypeList.aspx");
                }
            }

            public static string IssuePriorityTypeDetail
            {
                get
                {
                    return ("~/Admin/Pages/Issue/IssuePriorityTypeDetail.aspx");
                }
            }

            public static string PlatformTypeList
            {
                get
                {
                    return ("~/Admin/Pages/Project/PlatformTypeList.aspx");
                }
            }

            public static string PlatformTypeDetail
            {
                get
                {
                    return ("~/Admin/Pages/Project/PlatformTypeDetail.aspx");
                }
            }

            public static string CompanyList { get { return ("~/Admin/Pages/Company/CompanyList.aspx"); } }
            public static string CompanyDetail { get { return ("~/Admin/Pages/Company/CompanyDetail.aspx"); } }
            public static string ProjectList { get { return ("~/Workspace/ProjectList.aspx"); } }
            public static string ProjectDetail { get { return ("~/Workspace/ProjectDetail.aspx"); } }
            public static string DashBoard { get { return ("~/Workspace/DashBoard.aspx"); } }
            public static string UserProfile { get { return ("~/Workspace/UserProfile.aspx"); } }
            public static string IssueList { get { return ("~/Workspace/IssueList.aspx"); } }
            public static string IssueDetail { get { return ("~/Workspace/IssueDetail.aspx"); } }
            public static string IssueSeverityTypeList { get { return ("~/Admin/Pages/Issue/IssueSeverityTypeList.aspx"); } }
            public static string IssueSeverityTypeDetail { get { return ("~/Admin/Pages/Issue/IssueSeverityTypeDetail.aspx"); } }
            public static string CategoryList { get { return ("~/Admin/Pages/Issue/CategoryList.aspx"); } }
            public static string CategoryDetail { get { return ("~/Admin/Pages/Issue/CategoryDetail.aspx"); } }
            public static string VersionList { get { return ("~/Admin/Pages/Project/VersionList.aspx"); } }
            public static string VersionDetail { get { return ("~/Admin/Pages/Project/VersionDetail.aspx"); } }
            public static string BuildList { get { return ("~/Admin/Pages/Project/BuildList.aspx"); } }
            public static string BuildDetail { get { return ("~/Admin/Pages/Project/BuildDetail.aspx"); } }
            public static string ReproducedList { get { return ("~/Admin/Pages/Issue/ReproducedList.aspx"); } }
            public static string ReproducedDetail { get { return ("~/Admin/Pages/Issue/ReproducedDetail.aspx"); } }
            public static string ReportedByList { get { return ("~/Workspace/ReportedByList.aspx"); } }
            public static string ReportedByDetail { get { return ("~/Workspace/ReportedByDetail.aspx"); } }
            public static string WorkLogList { get { return ("~/Workspace/WorkLogList.aspx"); } }
            public static string WorkLogDetail { get { return ("~/Workspace/WorkLogDetail.aspx"); } }
        }
    }
}